package com.foreknow.elm.controller;

import com.foreknow.elm.po.Food;
import com.foreknow.elm.service.FoodService;
import com.foreknow.elm.service.impl.FoodServiceImpl;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class FoodController {
    /**
     * 功能：根据商家编号查询所属食品信息
     *
     * @param request
     * @return
     */
    public Object listFoodByBusinessId(HttpServletRequest request) {
        String businessId = request.getParameter("businessId");
        FoodService foodService = new FoodServiceImpl();
        List<Food> list = foodService.listFoodByBusinessId(Integer.valueOf(businessId));
        return list;
    }
}
